package com.Rendering.Entity;

import com.Gameplay.character.Role.parentRole;
import com.Rendering.StageScene.GameScene;

import javafx.scene.canvas.GraphicsContext;
import javafx.scene.paint.Color;

public class PlayerRender {

    public void render(GameScene gameScene, parentRole entity, float partialTicks) {
        GraphicsContext renderGC = gameScene.getEntityRenderGC();
        double dx = entity.getPreX() + (entity.getCurrentX() - entity.getPreX()) * partialTicks;
        double dy = entity.getPreY() + (entity.getCurrentY() - entity.getPreY()) * partialTicks;
        if (entity.getClientId()==1) {
            renderGC.setFill(Color.RED);
        } else {
            renderGC.setFill(Color.BLUE);
        }
        renderGC.fillOval(dx, dy, 10, 10);
        renderGC.setStroke(Color.GREEN);
        renderGC.strokeRect(dx - 75, dy - 150, 150, 300);

    }
}
